#ifndef __BSP_TIM__
#define __BSP_TIM__

#ifdef __cplusplus
extern "C" {
#endif

#include "bsp_config.h"

#define bsp_hal_delay(ms)                               HAL_Delay(ms)
#define bsp_tick_get()                                  HAL_GetTick()

#define rgb_pwm_start_r() HAL_TIM_PWM_Start(&RGB_R_TIM, RGB_R_CHANNEL)
#define rgb_pwm_start_g() HAL_TIM_PWM_Start(&RGB_G_TIM, RGB_G_CHANNEL)
#define rgb_pwm_start_b() HAL_TIM_PWM_Start(&RGB_B_TIM, RGB_B_CHANNEL)

void bsp_delay_us(uint32_t us);
void bsp_delay_ms(uint32_t ms);                                      

void pwm_set_ccr(void *tim_p, uint32_t channel, uint32_t value_t);

#ifdef __cplusplus
}
#endif

#endif